package com.gzhryc.common.config.models;

import java.util.ArrayList;
import java.util.List;

import com.gzhryc.common.xml.annotation.XmlElement;
import com.gzhryc.common.xml.annotation.XmlText;

@XmlElement("config")
public class XmlConfigEntity {

	@XmlElement("parameters")
	private List<Parameter> parameters;
	
	public XmlConfigEntity(){
		this.parameters = new ArrayList<Parameter>();
	}

	public List<Parameter> getParameters() {
		return parameters;
	}

	public void setParameters(List<Parameter> parameters) {
		this.parameters = parameters;
	}

	public static class Parameter {
		
		private String name;
		@XmlElement("item")
		private List<Item> item;
		
		public Parameter(){
			this.item = new ArrayList<Item>();
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public List<Item> getItem() {
			return item;
		}

		public void setItem(List<Item> item) {
			this.item = item;
		}
		
	}
	
	public static class Item {
		
		private String id;
		private String name;
		private String type;
		private String input;
		@XmlText()
		private String value;
		
		public String getId() {
			return id;
		}
		public void setId(String id) {
			this.id = id;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getValue() {
			return value;
		}
		public void setValue(String value) {
			this.value = value;
		}
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public String getInput() {
			return input;
		}
		public void setInput(String input) {
			this.input = input;
		}
	}
}
